Skip to main content

textShift

Type

property

Summary

Specifies how far text is shifted up or down from its baseline.

Syntax

set the textShift of <chunk> of <field> to <pixels>

Description

Use the textShift property to subscript and superscript chunks of text in a field.

The textShift is the number of pixels to shift the text down from the baseline, creating a subscript. If the textShift is negative, the text is shifted up (superscripted). If the textShift is zero, the text is placed in normal position, not shifted up or down.

note

If the field's fixedLineHeight property is true, you may need to increase the field's textHeight to make room for subscripts and superscripts.

Examples

set the textShift of last char of word 2 of field 1 to 3 -- subscript
set the textShift of char 12 of the selectedField to -1 -- superscript

object: field

property: fixedLineHeight, pixels, textHeight

glossary: property, chunk, negative

keyword: field, integer

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?